<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=i, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr=[1,2,3,4];
        let i = arr.findIndex((item,index)=>{
            return item ==3;
        })
        console.log(i);
        //判断数据是否包含某个值
        console.log(arr.includes(5))
    </script>
    
</body>
</html>